Smoothing URL parameter#57
Merged
Merged
Conversation
Smoothing was still being written to the URL query string whenever the user changed the setting, causing unwanted URL pollution. Remove the smoothing serialization from DashboardDeepLinkProvider's serializeStateToQueryParams. Smoothing is already persisted in localStorage, so it does not need to live in the URL. Deserialization is kept for backwards compatibility with old bookmarked URLs that may contain a smoothing parameter. Fixes #54 Co-authored-by: Samuel <samuel@knutsen.co>
|
Cursor Agent can help with this pull request. Just |
Preview Deployment
Details
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for features / changes
This change addresses issue #54, where the smoothing setting was unnecessarily serialized into the URL query parameters. This behavior cluttered the URL and was not desired. The motivation is to remove smoothing from URL serialization while maintaining backwards compatibility for deserialization, allowing old bookmarked links to still apply the smoothing setting.
Technical description of changes
tensorbored/webapp/routes/dashboard_deeplink_provider.ts:store.select(selectors.getMetricsSettingOverrides)block fromserializeStateToQueryParams. This prevents thesmoothingquery parameter from being added to the URL.deserializeQueryParamsmethod remains unchanged, ensuring that existing URLs withsmoothingparameters are still correctly interpreted.tensorbored/webapp/routes/dashboard_deeplink_provider_test.ts:smoothingin the serialized output.Screenshots of UI changes (or N/A)
N/A
Detailed steps to verify changes work correctly (as executed by you)
smoothingquery parameter should not appear or change in the URL.?smoothing=0.5(or any value) and navigate to it. Verify that the smoothing slider on the dashboard updates to the specified value.Alternate designs / implementations considered (or N/A)
N/A